﻿@{
    ViewBag.Title = "MyArticles";
    Layout = "~/Views/Shared/_LayoutPage1.cshtml";
}
<style type="text/css">
    table {border: 1px solid gray;border-collapse: collapse;}
    table td {border: 1px solid gray;padding:5px;}
</style>
<h2>我发表的帖子</h2>
<hr /><br />
<table>
    <tr style="background-color:Window;text-align:center">
        <td>ID</td>
        <td>内容</td>
        <td>发表时间</td>
        <td>操作</td>
    </tr>
    @foreach (Model.Articles item in ViewBag.list)
    {
        <tr>
            <td>@item.ID</td>
            <td>@item.Content</td>
            <td>@item.CreateTime</td>
            <td>
                <a href="/Articles/Del/@item.ID">删除</a> | 
                <a href="/Articles/Update/@item.ID">修改</a>
            </td>
        </tr>
    }
</table>
<div style="color: red">@TempData["msg"]</div>
